﻿using System;
using System.ComponentModel;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using CapstoneWinPhone.Data;

namespace CapstoneWinPhone.ViewModels
{
    public class ExpenseViewModel: INotifyPropertyChanged
    {

        public ExpenseLog _expenseLog;

        public ExpenseLog ExpenseLog { get { return _expenseLog; }
        set
        {
            if(value != _expenseLog)
            {
                _expenseLog = value;
                NotifyPropertyChanged("ExpenseLog");
            }
        }}

        public ExpenseLog _currentLog;

        public ExpenseLog CurrentLog { get { return _currentLog; }
        set
        {
            if(value != _currentLog)
            {
                _currentLog = value;
                NotifyPropertyChanged("CurrentLog");
            }
        }}
        

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
